<div id="content">
  <div class="row s_page_title">
    <sa-big-breadcrumbs
      [items]="['系统基础管理', '公司管理', '合同方案配置']"
      icon="fa fa-list"
      class="col-xs-12 col-sm-7 col-md-7 col-lg-4"
    ></sa-big-breadcrumbs>
  </div>
  <sa-widgets-grid>
    <div class="s_table">
      <div sa-widget [editbutton]="false" color="darken" class="clearfix">
        <header>
          <span class="widget-icon"><i class="fa fa-table"></i></span>
          <h2>合同方案配置</h2>
        </header>
        <div>
          <div class="widget-body no-padding">
            <div class="page-header clearfix s_table_opreation">
              <div class="left page-header-btn">
                <div class="top_module">
                  <span class="module_text">公司名称</span>
                  <sa-company-tree
                    companyTreeId="companyTree"
                    (companySelected)="companySelected($event)"
                  ></sa-company-tree>
                </div>
                <div class="top_module top_module_box">
                  <span class="module_text">方案名称</span>
                  <input
                    type="text"
                    class="module_inp top_module_select"
                    [(ngModel)]="tableParam.scenarioName"
                    placeholder="方案名称"
                  />
                </div>
                <div class="top_module top_module_box">
                  <span class="top_module_label module_text">生效状态</span>
                  <select name="" class="top_module_select" [(ngModel)]="tableParam.status">
                    <option value="">全部</option>
                    <option value="1">已生效</option>
                    <option value="0">未生效</option>
                  </select>
                </div>
                <div class="top_module top_module_box">
                  <span class="top_module_label module_text">时间类型</span>
                  <select name="" class="top_module_select" [(ngModel)]="tableParam.dateType">
                    <option value="">全部</option>
                    <option value="1">创建时间</option>
                    <option value="2">更新时间</option>
                  </select>
                </div>
                <div class="top_module top_module_box">
                  <span class="top_module_label module_text">排序</span>
                  <select name="" class="top_module_select" [(ngModel)]="tableParam.sortType">
                    <option value="2">升序</option>
                    <option value="1">降序</option>
                  </select>
                </div>
                <!--<div class="selectDate top_module">
                                      <table-select-date [notInit]='true' (outerTime)="getSelectTableTime($event)"  [specifyTime]='initDateRange' [minDay]='true'></table-select-date>
                                  </div>-->
                <button type="button" class="btn btn-primary" (click)="table_search()">查询</button>
                <button type="button" class="btn btn-primary" (click)="showAddUserModal(projectEventModal)">
                  添加
                </button>
              </div>
              <!--<div class="right top-search">
                                  <input type="text" [(ngModel)]="tableParam.searchKey" (change)="table_search()" class="search-input" placeholder="项目名称、原因分析">
                                  <span class="top-search-box">
                                      <button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
                                  </span>
                              </div>-->
            </div>
            <div class="table_scroll">
              <table
                class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table"
              >
                <thead>
                  <tr>
                    <th>方案编号</th>
                    <th>方案名称</th>
                    <th>方案配置</th>
                    <th>生效状态</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th>更新人</th>
                    <th>更新时间</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                  <tr *ngFor="let row of tableData">
                    <td>{{ row.scenarioNumber }}</td>
                    <td>{{ row.scenarioName }}</td>
                    <td>
                      <button type="button" (click)="viewRow(row, projectEventModal1, 'detail')">方案详细</button>
                    </td>
                    <td>
                      <span *ngIf="row.status == 0" class="red">无效</span>
                      <span *ngIf="row.status == 1" class="green">有效</span>
                    </td>
                    <td>{{ row.userNameForCreate }}</td>
                    <td>{{ row.createTime }}</td>
                    <td>{{ row.userNameForUpdate }}</td>
                    <td>{{ row.updateTime }}</td>
                    <td>
                      <button type="button" (click)="editRow(row, projectEventModal, 'update')">编辑</button>
                      <button type="button" (click)="delRow(row)">删除</button>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="table-fix clearfix">
              <paginator
                [totalRecords]="totalCount"
                [rows]="pageSize"
                [currentPage]="curPage - 1"
                (onPageChange)="paginate($event)"
              ></paginator>
              <button type="button" class="btn default refresh_btn" (click)="refresh()">
                <i class="fa fa-refresh"></i>
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </sa-widgets-grid>
</div>

<!-- 新增合同方案   弹窗-->
<section
  bsModal
  #projectEventModal="bs-modal"
  class="modal fade"
  tabindex="-1"
  role="dialog"
  aria-labelledby="myLargeModalLabel"
  aria-hidden="true"
>
  <div class="modal-dialog modal-lg" style="width: 1000px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeProjectEventModal(projectEventModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">
          <span *ngIf="formType == 'add'">新增</span>
          <span *ngIf="formType == 'update'">编辑</span>
          合同方案
        </h4>
      </div>
      <form
        id="projectEventForm"
        class="form-horizontal"
        role="form"
        novalidate="novalidate"
        [saBootstrapValidator]="validatorOptions"
      >
        <div class="modal-body">
          <div class="row form-horizontal">
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">
                方案名称
                <sup>*</sup>
              </label>
              <div class="col-xs-10">
                <input
                  class="form-control"
                  name="scenarioName"
                  [(ngModel)]="contractForm.scenarioName"
                  placeholder="方案名称"
                />
              </div>
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">
                适用范围
                <sup>*</sup>
              </label>
              <div class="col-xs-10">
                <sa-company-tree-checkbox
                  wrap="html"
                  companyTreeId="companyTreeFrom"
                  [Height]="32"
                  [companyValue]="contractForm.companyArrays"
                  (companySelected)="addCompanySelected($event)"
                ></sa-company-tree-checkbox>
              </div>
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">生效状态</label>
              <div class="col-xs-6">
                <td class="smart-form" style="padding: 7px 10px; text-align: center">
                  <input
                    style="margin-right: 5px; display: none"
                    name="status"
                    class="isStatus"
                    type="checkbox"
                    [checked]="contractForm.status"
                  />
                </td>
              </div>
            </div>
            <div *ngFor="let item of firstCostEntities; let i = index">
              <div class="form-group col-xs-12">
                <label class="control-label col-xs-2">
                  <{{ i + 1 }}>首次安装价格[元]
                  <sup>*</sup>
                </label>
                <div class="col-xs-4">
                  <input
                    class="form-control"
                    name="firstCost"
                    placeholder="费用"
                    onkeyup="value=value.replace(/[^\-?\d.]/g,'')"
                    [value]="item.firstCost"
                    (change)="firstCostChange($event.target.value, i)"
                  />
                </div>
                <div class="col-xs-4 note">注：首次安装缴费用包含设备费用+首年服务费用</div>
                <div class="col-xs-2">
                  <span class="addBtn" *ngIf="i == 0" (click)="addInstallation()">
                    <i class="fa fa-plus" aria-hidden="true"></i>
                  </span>
                  <span *ngIf="i > 0" class="addBtn" (click)="deleteInstallation(i)">
                    <i class="fa fa-minus" aria-hidden="true"></i>
                  </span>
                </div>
              </div>
              <div class="moudle_group col-xs-12" *ngIf="contractForm.isOpenInstallTax" style="margin-bottom: 20px">
                <div class="group_title">{{ item.installTax[0].name }}:</div>
                <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 10px">
                  <div class="col-xs-6 form-group invoice">
                    <label class="control-label col-xs-4">开票金额</label>
                    <div class="col-xs-8">
                      <input
                        class="form-control"
                        name="taxPrice1"
                        onkeyup="value=value.replace(/[^\-?\d.]/g,'')"
                        [value]="item.installTax[0].taxPrice"
                        (change)="taxPriceChange($event.target.value, i, 0)"
                        placeholder="开票金额"
                      />
                    </div>
                  </div>
                  <div class="col-xs-6 invoice">
                    <label class="control-label col-xs-4">开票税率</label>
                    <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                      <select
                        class="form-control"
                        name="costType1"
                        [value]="item.installTax[0].tax"
                        (change)="taxChange($event.target.value, i, 0)"
                        style="width: 100%"
                      >
                        <option value="">请选择</option>
                        <option value="0.06">6%</option>
                        <option value="0.13">13%</option>
                      </select>
                    </div>
                  </div>
                </div>
                <div class="group_title">{{ item.installTax[1].name }}:</div>
                <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 0px">
                  <div class="col-xs-6 form-group invoice">
                    <label class="control-label col-xs-4">开票金额</label>
                    <div class="col-xs-8">
                      <input
                        class="form-control"
                        name="taxPrice2"
                        onkeyup="value=value.replace(/[^\-?\d.]/g,'')"
                        [value]="item.installTax[1].taxPrice"
                        (change)="taxPriceChange($event.target.value, i, 1)"
                        placeholder="开票金额"
                      />
                    </div>
                  </div>
                  <div class="col-xs-6 invoice">
                    <label class="control-label col-xs-4">开票税率</label>
                    <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                      <select
                        class="form-control"
                        name="costType2"
                        [value]="item.installTax[1].tax"
                        (change)="taxChange($event.target.value, i, 1)"
                        style="width: 100%"
                      >
                        <option value="">请选择</option>
                        <option value="0.06">6%</option>
                        <option value="0.13">13%</option>
                      </select>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group col-xs-12 materialWrap">
              <div *ngFor="let item of renewalCostList; let i = index" class="col-xs-12 materialBottom">
                <label class="control-label col-xs-2">
                  续费时长[月]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="renewalCostMonth"
                    onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
                    [value]="item.costMonth ? item.costMonth : ''"
                    (change)="contentChange($event.target.value, i, 'costMonth', 1)"
                    placeholder="续费时长"
                  />
                  <!-- onkeyup="!/^([1-9]|1[0-2])$/.test(value)?(value=value.substring(0, value.length-1)): ''" -->
                </div>
                <label class="control-label col-xs-2">
                  服务续费价格[元]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="renewalCost"
                    onkeyup="value=/[^0-9.]+/.test(value)
                    ? value.replace(/[^0-9.]+/, '')
                    : /\.{2,}/.test(value)
                    ? value.replace(/\.{2,}/, '.')
                    : value.replace(/(\d+)\.(\d)(\d)./, '$1.$2$3')"
                    [value]="item.costAccount ? item.costAccount : ''"
                    (change)="contentChange($event.target.value, i, 'costAccount', 1)"
                    placeholder="费用"
                  />
                  <!-- onkeyup="!/^(\d+\.?)?\d{0,1}$/.test(value)?(value=value.substring(0, value.length-1)): ''" -->
                </div>
                <div class="col-xs-2">
                  <span class="addBtn" *ngIf="i == 0" (click)="addMaterial(1)">
                    <i class="fa fa-plus" aria-hidden="true"></i>
                  </span>
                  <span *ngIf="i > 0" class="addBtn" (click)="deleteMaterial(1, i)">
                    <i class="fa fa-minus" aria-hidden="true"></i>
                  </span>
                </div>
              </div>
            </div>

            <div class="form-group col-xs-12 materialWrap">
              <div *ngFor="let item of dockingCostList; let i = index" class="col-xs-12 materialBottom">
                <label class="control-label col-xs-2">
                  对接时长[月]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="dockingCostMonth"
                    onkeyup="!/^([1-9]|1[0-2])$/.test(value)?(value=value.substring(0, value.length-1)): ''"
                    [value]="item.costMonth ? item.costMonth : ''"
                    (change)="contentChange($event.target.value, i, 'costMonth', 2)"
                    placeholder="对接时长"
                  />
                </div>
                <label class="control-label col-xs-2">
                  对接费价格[元]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="dockingCost"
                    onkeyup="value=/[^0-9.]+/.test(value)
                    ? value.replace(/[^0-9.]+/, '')
                    : /\.{2,}/.test(value)
                    ? value.replace(/\.{2,}/, '.')
                    : value.replace(/(\d+)\.(\d)(\d)./, '$1.$2$3')"
                    [value]="item.costAccount ? item.costAccount : ''"
                    (change)="contentChange($event.target.value, i, 'costAccount', 2)"
                    placeholder="费用"
                  />
                </div>
                <div class="col-xs-2">
                  <span class="addBtn" *ngIf="i == 0" (click)="addMaterial(2)">
                    <i class="fa fa-plus" aria-hidden="true"></i>
                  </span>
                  <span *ngIf="i > 0" class="addBtn" (click)="deleteMaterial(2, i)">
                    <i class="fa fa-minus" aria-hidden="true"></i>
                  </span>
                </div>
              </div>
            </div>

            <!-- <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">服务续费价格[元]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="renewalCost" [(ngModel)]='contractForm.renewalCost'
                                      placeholder="费用" />
                              </div>
                          </div>
                          <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">续费时长[月]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="renewalMonth" [(ngModel)]='contractForm.renewalMonth'
                                      onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="续费时长" />
                              </div>
                          </div>
                          <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">对接费用价格[元]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="outsideCost" [(ngModel)]='contractForm.outsideCost'
                                      placeholder="对接费用" />
                              </div>
                          </div>
                          <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">对接时长[月]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="outsideMonth" [(ngModel)]='contractForm.outsideMonth'
                                      onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="对接时长" />
                              </div>
                          </div> -->

            <div class="dashed_border col-xs-12"></div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">安装费电子发票</label>
              <div class="col-xs-6">
                <td class="smart-form" style="padding: 7px 10px; text-align: center">
                  <input
                    style="margin-right: 5px; display: none"
                    name="isOpenInstallTax"
                    class="isStatus isStatus1"
                    type="checkbox"
                    [checked]="contractForm.isOpenInstallTax"
                  />
                </td>
              </div>
              `
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">维修费电子发票</label>
              <div class="col-xs-6">
                <td class="smart-form" style="padding: 7px 10px; text-align: center">
                  <input
                    style="margin-right: 5px; display: none"
                    name="isOpenMaintainTax"
                    class="isStatus isStatus1"
                    type="checkbox"
                    [checked]="contractForm.isOpenMaintainTax"
                  />
                </td>
              </div>
              `
            </div>
            <div class="moudle_group col-xs-12" *ngIf="contractForm.isOpenMaintainTax">
              <div class="group_title">{{ contractForm.maintainTax.name }}:</div>
              <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 0px">
                <div class="col-xs-6 invoice">
                  <label class="control-label col-xs-4">
                    开票税率
                    <sup>*</sup>
                  </label>
                  <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                    <select
                      class="form-control"
                      name="costType3"
                      [(ngModel)]="contractForm.maintainTax.tax"
                      style="width: 100%"
                    >
                      <option value="">请选择</option>
                      <option value="0.06">6%</option>
                      <option value="0.13">13%</option>
                    </select>
                  </div>
                </div>
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">续费/对接费电子发票</label>
              <div class="col-xs-6">
                <td class="smart-form" style="padding: 7px 10px; text-align: center">
                  <input
                    style="margin-right: 5px; display: none"
                    name="isOpenServiceTax"
                    class="isStatus isStatus1"
                    type="checkbox"
                    [checked]="contractForm.isOpenServiceTax"
                  />
                </td>
              </div>
              `
            </div>
            <div class="moudle_group col-xs-12" *ngIf="contractForm.isOpenServiceTax">
              <div class="group_title">{{ contractForm.serviceTax.name }}:</div>
              <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 0px">
                <div class="col-xs-6 invoice">
                  <label class="control-label col-xs-4">
                    开票税率
                    <sup>*</sup>
                  </label>
                  <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                    <select
                      class="form-control"
                      name="costType4"
                      [(ngModel)]="contractForm.serviceTax.tax"
                      style="width: 100%"
                    >
                      <option value="">请选择</option>
                      <option value="0.06">6%</option>
                      <option value="0.13">13%</option>
                    </select>
                  </div>
                </div>
              </div>
            </div>

            <!-- <div class="form-group col-xs-18" style="margin-left: 12px;">
                              <div class="form-group invoice col-xs-4">
                                  <label class="control-label col-xs-6">安装费是否开启电子发票</label>
                                  <div class="col-xs-18">
                                      <td class="smart-form" style="padding: 7px 10px;text-align: center;">
                                          <input style="margin-right: 5px;display: none;" name="isOpenInstallTax"
                                              class="isStatus isStatus1" type="checkbox"
                                              [checked]="contractForm.isOpenInstallTax" />
                                      </td>
                                  </div>
                              </div>
                              <div class="form-group invoice col-xs-4">
                                  <label class="control-label col-xs-6">维修费是否开启电子发票</label>
                                  <div class="col-xs-18">
                                      <td class="smart-form" style="padding: 7px 10px;text-align: center;">
                                          <input style="margin-right: 5px;display: none;" name="isOpenMaintainTax"
                                              class="isStatus isStatus1" type="checkbox"
                                              [checked]="contractForm.isOpenMaintainTax" />
                                      </td>
                                  </div>
                              </div>
                              <div class="form-group invoice col-xs-4" style="margin-left: 12px;">
                                  <label class="control-label col-xs-6">续费/对接费是否开启电子发票</label>
                                  <div class="col-xs-18">
                                      <td class="smart-form" style="padding: 7px 10px;text-align: center;">
                                          <input style="margin-right: 5px;display: none;" name="isOpenServiceTax"
                                              class="isStatus isStatus1" type="checkbox"
                                              [checked]="contractForm.isOpenServiceTax" />
                                      </td>
                                  </div>
                              </div>
                          </div> -->

            <div class="dashed_border col-xs-12"></div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">电子合同</label>
              <div class="col-xs-6">
                <td class="smart-form" style="padding: 7px 10px; text-align: center">
                  <input
                    style="margin-right: 5px; display: none"
                    name="electronicContract"
                    class="isStatus"
                    type="checkbox"
                    [checked]="contractForm.electronicContract"
                  />
                </td>
              </div>
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">是否需要身份校验</label>
              <div class="col-xs-6">
                <td class="smart-form" style="padding: 7px 10px; text-align: center">
                  <input
                    style="margin-right: 5px; display: none"
                    name="auth"
                    class="isStatus"
                    type="checkbox"
                    [checked]="contractForm.auth"
                  />
                </td>
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">电子合同模板</label>
              <div class="control-label col-xs-2">首次安装模板</div>
              <div class="col-xs-6">
                <div class="imgFileList viewer1">
                  <div class="imgFileList-other">
                    <div class="imgFileList-multifile">
                      <div class="uploadlocation uploadlocation1">
                        <div class="content-list">
                          <!--<div *ngIf="imageInfo.firstModelUrl.length">-->
                          <div class="headImg" *ngFor="let item of imageInfo.firstModelUrl; let i = index">
                            <div class="contentImg">
                              <img class="img" alt="首次安装模板" [src]="item" (click)="bigImgClick('viewer1')" />
                            </div>
                            <i class="deleteImg" (click)="deleteImg('1', i, 'firstModelUrl')"></i>
                          </div>
                          <!--</div>-->
                          <button type="button" class="btn div_imgall">
                            <div class="div_shuline"></div>
                            <div class="div_hengline"></div>
                            <input
                              type="file"
                              class="up"
                              title=" "
                              placeholder=" "
                              (change)="multifileChange($event.target.files, 'firstModelUrl')"
                            />
                          </button>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <!--<div class="col-xs-4 note">注：推荐长传图片尺寸[宽*高]：812*1555</div>-->
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2"></label>
              <div class="control-label col-xs-2">服务续费模板</div>
              <div class="col-xs-6">
                <div class="imgFileList viewer2">
                  <div class="imgFileList-other">
                    <div class="imgFileList-multifile">
                      <div class="uploadlocation uploadlocation1">
                        <div class="content-list">
                          <!--<div *ngIf="imageInfo.renewalModelUrl.length">-->
                          <div class="headImg" *ngFor="let item of imageInfo.renewalModelUrl; let i = index">
                            <div class="contentImg">
                              <img class="img" alt="服务续费模板" [src]="item" (click)="bigImgClick('viewer2')" />
                            </div>
                            <i class="deleteImg" (click)="deleteImg('1', i, 'renewalModelUrl')"></i>
                          </div>
                          <!--</div>-->
                          <button type="button" class="btn div_imgall">
                            <div class="div_shuline"></div>
                            <div class="div_hengline"></div>
                            <input
                              type="file"
                              class="up"
                              title=" "
                              placeholder=" "
                              (change)="multifileChange($event.target.files, 'renewalModelUrl')"
                            />
                          </button>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <!--<div class="col-xs-4 note">注：推荐长传图片尺寸[宽*高]：812*1555</div>-->
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" (click)="closeProjectEventModal(projectEventModal)">
            取消
          </button>
          <button type="button" class="btn btn-primary" (click)="projectEventSubmit(projectEventModal)">确认</button>
        </div>
      </form>
    </div>
  </div>
</section>
<!-- 新增项目车辆 弹窗end-->

<!-- 合同方案查看   弹窗-->
<section
  bsModal
  #projectEventModal1="bs-modal"
  class="modal fade"
  tabindex="-1"
  role="dialog"
  aria-labelledby="myLargeModalLabel"
  aria-hidden="true"
>
  <div class="modal-dialog modal-lg" style="width: 860px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeProjectEventModal(projectEventModal1)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">合同方案</h4>
      </div>
      <form class="form-horizontal" role="form" novalidate="novalidate">
        <div class="modal-body">
          <div class="row form-horizontal">
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">
                方案名称
                <sup>*</sup>
              </label>
              <div class="col-xs-10">
                <input
                  class="form-control"
                  name="scenarioName"
                  [(ngModel)]="contractForm.scenarioName"
                  placeholder="方案名称"
                  disabled
                />
              </div>
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">
                适用范围
                <sup>*</sup>
              </label>
              <div class="col-xs-10">
                <input
                  class="form-control"
                  name="companyNames"
                  [(ngModel)]="contractForm.companyName"
                  disabled
                  [attr.title]="contractForm.companyName"
                />
              </div>
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">生效状态</label>
              <div class="col-xs-6">
                <td class="smart-form" style="height: 28px; line-height: 28px; text-align: center">
                  <div class="mySwitch" *ngIf="contractForm.status == '0'">
                    <span class="white"></span>
                    <span class="closeText">关闭</span>
                  </div>
                  <div class="mySwitch" *ngIf="contractForm.status == '1'">
                    <span class="openText">开启</span>
                    <span class="white"></span>
                  </div>
                </td>
              </div>
            </div>
            <div *ngFor="let item of firstCostEntities; let i = index">
              <div class="form-group col-xs-12">
                <label class="control-label col-xs-2">
                  <{{ i + 1 }}>首次安装价格[元]
                  <sup>*</sup>
                </label>
                <div class="col-xs-4">
                  <input
                    class="form-control"
                    name="firstCost"
                    placeholder="费用"
                    onkeyup="value=value.replace(/[^\-?\d.]/g,'')"
                    [value]="item.firstCost"
                    disabled
                    (change)="firstCostChange($event.target.value, i)"
                  />
                </div>
                <div class="col-xs-4 note">注：首次安装缴费用包含设备费用+首年服务费用</div>
              </div>
              <div class="moudle_group col-xs-12" *ngIf="contractForm.isOpenInstallTax" style="margin-bottom: 20px">
                <div class="group_title">{{ item.installTax[0].name }}:</div>
                <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 10px">
                  <div class="col-xs-6 form-group invoice">
                    <label class="control-label col-xs-4">开票金额</label>
                    <div class="col-xs-8">
                      <input
                        class="form-control"
                        name="taxPrice1"
                        onkeyup="value=value.replace(/[^\-?\d.]/g,'')"
                        [value]="item.installTax[0].taxPrice"
                        disabled
                        (change)="taxPriceChange($event.target.value, i, 0)"
                        placeholder="开票金额"
                      />
                    </div>
                  </div>
                  <div class="col-xs-6 invoice">
                    <label class="control-label col-xs-4">开票税率</label>
                    <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                      <select
                        class="form-control"
                        name="costType1"
                        [value]="item.installTax[0].tax"
                        disabled
                        (change)="taxChange($event.target.value, i, 0)"
                        style="width: 100%"
                      >
                        <option value="">请选择</option>
                        <option value="0.06">6%</option>
                        <option value="0.13">13%</option>
                      </select>
                    </div>
                  </div>
                </div>
                <div class="group_title">{{ item.installTax[1].name }}:</div>
                <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 0px">
                  <div class="col-xs-6 form-group invoice">
                    <label class="control-label col-xs-4">开票金额</label>
                    <div class="col-xs-8">
                      <input
                        class="form-control"
                        name="taxPrice2"
                        onkeyup="value=value.replace(/[^\-?\d.]/g,'')"
                        [value]="item.installTax[1].taxPrice"
                        disabled
                        (change)="taxPriceChange($event.target.value, i, 1)"
                        placeholder="开票金额"
                      />
                    </div>
                  </div>
                  <div class="col-xs-6 invoice">
                    <label class="control-label col-xs-4">开票税率</label>
                    <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                      <select
                        class="form-control"
                        name="costType2"
                        [value]="item.installTax[1].tax"
                        disabled
                        (change)="taxChange($event.target.value, i, 1)"
                        style="width: 100%"
                      >
                        <option value="">请选择</option>
                        <option value="0.06">6%</option>
                        <option value="0.13">13%</option>
                      </select>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group col-xs-12 materialWrap">
              <div *ngFor="let item of renewalCostList; let i = index" class="col-xs-12 materialBottom">
                <label class="control-label col-xs-2">
                  续费时长[月]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="renewalCostMonth"
                    onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
                    [value]="item.costMonth ? item.costMonth : ''"
                    (change)="contentChange($event.target.value, i, 'costMonth', 1)"
                    placeholder="续费时长"
                    disabled
                  />
                </div>
                <label class="control-label col-xs-2">
                  服务续费价格[元]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="renewalCost"
                    [value]="item.costAccount ? item.costAccount : ''"
                    (change)="contentChange($event.target.value, i, 'costAccount', 1)"
                    placeholder="费用"
                    disabled
                  />
                </div>
                <div class="col-xs-2">
                  <!-- <span class="addBtn" *ngIf="i==0" (click)="addMaterial(1)"><i class="fa fa-plus"
                                              aria-hidden="true"></i> </span>
                                      <span *ngIf="i>0" class="addBtn" (click)="deleteMaterial(1,i)"><i
                                              class="fa fa-minus" aria-hidden="true"></i>
                                      </span> -->
                </div>
              </div>
            </div>

            <div class="form-group col-xs-12 materialWrap">
              <div *ngFor="let item of dockingCostList; let i = index" class="col-xs-12 materialBottom">
                <label class="control-label col-xs-2">
                  对接时长[月]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="dockingCostMonth"
                    onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
                    [value]="item.costMonth ? item.costMonth : ''"
                    (change)="contentChange($event.target.value, i, 'costMonth', 2)"
                    placeholder="对接时长"
                    disabled
                  />
                </div>
                <label class="control-label col-xs-2">
                  对接费价格[元]
                  <sup>*</sup>
                </label>
                <div class="col-xs-3">
                  <input
                    class="form-control"
                    name="dockingCost"
                    [value]="item.costAccount ? item.costAccount : ''"
                    (change)="contentChange($event.target.value, i, 'costAccount', 2)"
                    placeholder="费用"
                    disabled
                  />
                </div>
                <div class="col-xs-2">
                  <!-- <span class="addBtn" *ngIf="i==0" (click)="addMaterial(2)"><i class="fa fa-plus"
                                              aria-hidden="true"></i> </span>
                                      <span *ngIf="i>0" class="addBtn" (click)="deleteMaterial(2,i)"><i
                                              class="fa fa-minus" aria-hidden="true"></i>
                                      </span> -->
                </div>
              </div>
            </div>
            <!-- <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">服务续费价格[元]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="renewalCost" [(ngModel)]='contractForm.renewalCost'
                                      placeholder="费用" disabled />
                              </div>
                          </div>
                          <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">续费时长[月]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="renewalMonth" [(ngModel)]='contractForm.renewalMonth'
                                      onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="续费时长" disabled />
                              </div>
                          </div>
                          <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">对接费用价格[元]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="outsideCost" [(ngModel)]='contractForm.outsideCost'
                                      placeholder="对接费用" disabled />
                              </div>
                          </div>
                          <div class="form-group col-xs-12">
                              <label class="control-label col-xs-2">对接时长[月]<sup>*</sup></label>
                              <div class="col-xs-6">
                                  <input class="form-control" name="outsideMonth" [(ngModel)]='contractForm.outsideMonth'
                                      onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="对接时长" disabled />
                              </div>
                          </div> -->
            <div class="dashed_border col-xs-12"></div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">安装费电子发票</label>
              <div class="col-xs-6">
                <td class="smart-form" style="height: 28px; line-height: 28px; text-align: center">
                  <div class="mySwitch" *ngIf="contractForm.isOpenInstallTax == '0'">
                    <span class="white"></span>
                    <span class="closeText">关闭</span>
                  </div>
                  <div class="mySwitch" *ngIf="contractForm.isOpenInstallTax == '1'">
                    <span class="openText">开启</span>
                    <span class="white"></span>
                  </div>
                </td>
              </div>
              `
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">维修费电子发票</label>
              <div class="col-xs-6">
                <td class="smart-form" style="height: 28px; line-height: 28px; text-align: center">
                  <div class="mySwitch" *ngIf="contractForm.isOpenMaintainTax == '0'">
                    <span class="white"></span>
                    <span class="closeText">关闭</span>
                  </div>
                  <div class="mySwitch" *ngIf="contractForm.isOpenMaintainTax == '1'">
                    <span class="openText">开启</span>
                    <span class="white"></span>
                  </div>
                </td>
              </div>
            </div>
            <div class="moudle_group col-xs-12" *ngIf="contractForm.isOpenMaintainTax">
              <div class="group_title">{{ contractForm.maintainTax.name }}:</div>
              <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 0px">
                <div class="col-xs-6 invoice">
                  <label class="control-label col-xs-4">
                    开票税率
                    <sup>*</sup>
                  </label>
                  <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                    <select
                      class="form-control"
                      name="costType3"
                      [(ngModel)]="contractForm.maintainTax.tax"
                      style="width: 100%"
                      disabled
                    >
                      <option value="">请选择</option>
                      <option value="0.06">6%</option>
                      <option value="0.13">13%</option>
                    </select>
                  </div>
                </div>
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">续费/对接费电子发票</label>
              <div class="col-xs-6">
                <td class="smart-form" style="height: 28px; line-height: 28px; text-align: center">
                  <div class="mySwitch" *ngIf="contractForm.isOpenServiceTax == '0'">
                    <span class="white"></span>
                    <span class="closeText">关闭</span>
                  </div>
                  <div class="mySwitch" *ngIf="contractForm.isOpenServiceTax == '1'">
                    <span class="openText">开启</span>
                    <span class="white"></span>
                  </div>
                </td>
              </div>
            </div>
            <div class="moudle_group col-xs-12" *ngIf="contractForm.isOpenServiceTax">
              <div class="group_title">{{ contractForm.serviceTax.name }}:</div>
              <div class="form-group col-xs-24" style="margin-left: -15px; margin-bottom: 0px">
                <div class="col-xs-6 invoice">
                  <label class="control-label col-xs-4">
                    开票税率
                    <sup>*</sup>
                  </label>
                  <div class="col-xs-8 s_fix_select2_width s_fix_select2">
                    <select
                      class="form-control"
                      name="costType4"
                      [(ngModel)]="contractForm.serviceTax.tax"
                      style="width: 100%"
                      disabled
                    >
                      <option value="">请选择</option>
                      <option value="0.06">6%</option>
                      <option value="0.13">13%</option>
                    </select>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">电子合同</label>
              <div class="col-xs-6">
                <td class="smart-form" style="height: 28px; line-height: 28px; text-align: center">
                  <div class="mySwitch" *ngIf="contractForm.electronicContract == '0'">
                    <span class="white"></span>
                    <span class="closeText">关闭</span>
                  </div>
                  <div class="mySwitch" *ngIf="contractForm.electronicContract == '1'">
                    <span class="openText">开启</span>
                    <span class="white"></span>
                  </div>
                </td>
              </div>
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">是否需要身份校验</label>
              <div class="col-xs-6">
                <td class="smart-form" style="height: 28px; line-height: 28px; text-align: center">
                  <div class="mySwitch" *ngIf="contractForm.auth == '0'">
                    <span class="white"></span>
                    <span class="closeText">关闭</span>
                  </div>
                  <div class="mySwitch" *ngIf="contractForm.auth == '1'">
                    <span class="openText">开启</span>
                    <span class="white"></span>
                  </div>
                </td>
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2">电子合同模板</label>
              <div class="control-label col-xs-2">首次安装模板</div>
              <div class="col-xs-6">
                <div class="imgFileList viewer3">
                  <div class="imgFileList-other">
                    <div class="imgFileList-multifile">
                      <div class="uploadlocation uploadlocation1">
                        <div class="content-list">
                          <div class="headImg" *ngFor="let item of imageInfo.firstModelUrl; let i = index">
                            <div class="contentImg">
                              <img class="img" alt="首次安装模板" [src]="item" (click)="bigImgClick('viewer3')" />
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <!--<div class="col-xs-4 note">注：推荐长传图片尺寸[宽*高]：812*1555</div>-->
            </div>
            <div class="form-group col-xs-12">
              <label class="control-label col-xs-2"></label>
              <div class="control-label col-xs-2">服务续费模板</div>
              <div class="col-xs-6">
                <div class="imgFileList viewer4">
                  <div class="imgFileList-other">
                    <div class="imgFileList-multifile">
                      <div class="uploadlocation uploadlocation1">
                        <div class="content-list">
                          <div class="headImg" *ngFor="let item of imageInfo.renewalModelUrl; let i = index">
                            <div class="contentImg">
                              <img class="img" alt="服务续费模板" [src]="item" (click)="bigImgClick('viewer4')" />
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <!--<div class="col-xs-4 note">注：推荐长传图片尺寸[宽*高]：812*1555</div>-->
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
</section>
<!-- 合同方案查看 弹窗end-->
